30 HOME : VTAB 6: HTAB 6: PRINT "THE FOLLOWING DEMONSTRATION SHOULD"
32 PRINT : PRINT "GIVE YOU AN IDEA OF THE GRAPHICS ABIL-"
34 PRINT : PRINT "ITIES OF THIS COMPUTER."
35 PRINT
40 HTAB 6: PRINT "WHEN YOU ARE READY TO SEE THE": PRINT : PRINT "DEMONSTRATION, TYPE IN 'GRAPHICS'."
41 PRINT : PRINT
42 INPUT G$
45 IF G$ = "GRAPHICS" THEN 100
50 INPUT "THE WORD I'M WAITING FOR IS 'GRAPHICS' ";G$: GOTO 45
100 GR
105 COLOR= 12
110 HLIN 5,35 AT 3
120 HLIN 5,35 AT 28
130 VLIN 3,28 AT 5
140 VLIN 3,28 AT 35
143 FOR X = 1 TO 1000: NEXT X
150 HLIN 10,30 AT 6
160 HLIN 10,30 AT 20
170 VLIN 6,20 AT 10
180 VLIN 6,20 AT 30
185 HLIN 13,14 AT 23: HLIN 13,14 AT 24
187 HLIN 26,27 AT 23: HLIN 26,27 AT 24
190 FOR X = 1 TO 2000: NEXT X
195 HOME
200 PRINT : PRINT : PRINT
205 L$ = "LIST"
210 INPUT " IF YOU WANT TO SEE HOW THIS PROGRAM WORKS, TYPE IN LIST ";L$
230 IF L$ GOTO 240
240 TEXT : HOME
250 LIST 100,190
260 VTAB 21
265 INPUT "DO YOU WANT MORE INFORMATION? ";Y$
270 IF Y$ = "YES" GOTO 390
275 HOME : VTAB 10: HTAB 6
280 PRINT "OKAY, THEN YOU SHOULD LET SOMEONE": PRINT : PRINT "ELSE USE THE COMPUTER FOR A WHILE.": PRINT : PRINT "I HOPE YOU LEARNED SOMETHING NEW": PRINT : PRINT "ABOUT WRITING PROGRAMS WITH GRAPHICS."
290 SPEED= 255
300 END
390 PRINT : PRINT : HOME : VTAB 6
400 PRINT "WE USED THE FOLLOWING COMMANDS TO WRITE": PRINT : PRINT "THIS PROGRAM."
405 SPEED= 255: PRINT
410 HTAB 10: PRINT "1) GR
412 PRINT
415 HTAB 10: PRINT "2) COLOR
417 PRINT
420 HTAB 10: PRINT "3) HLIN
422 PRINT
425 HTAB 10: PRINT "4) VLIN
427 PRINT
430 HTAB 10: PRINT "5) FOR ...NEXT"
432 PRINT
440 PRINT "TYPE IN THE NUMBER OF THE ONE YOU ": PRINT : PRINT "WANT EXPLAINED": INPUT " ";X
445 SPEED= 50
450 ON X GOTO 500,550,600,650,700
500 HOME : VTAB 3: HTAB 6: PRINT "THE COMMAND 'GR' PUTS THE": PRINT : PRINT "COMPUTER IN TO GRAPHICS MODE SO YOU": PRINT : PRINT "CAN DRAW PICTURES AND GRAPHS": PRINT : PRINT "ON A 40 BY 40 GRID."
504 PRINT
505 HTAB 7: PRINT "FOUR LINES FOR TEXT ARE LEFT": HTAB 7: PRINT : PRINT "AT THE BOTTOM OF THE SCREEN.": GOSUB 1500
508 REM PAUSE
510 HTAB 7: PRINT : PRINT "AFTER WRITING 'GR' INTO YOUR": HTAB 7: PRINT : PRINT "PROGRAM, SET 'COLOR' TO A COLOR": HTAB 7: PRINT : PRINT "WHICH WILL SHOW ON THE SCREEN."
530 VTAB 24: GOTO 265
550 HOME : PRINT : HTAB 6
555 PRINT "THE COMMAND 'COLOR' WITH A NUM-": PRINT : PRINT "BER SETS THE TV COLOR FOR PLOT-"
560 PRINT : PRINT "TING LINES IN THE GRAPHICS MODE ": PRINT : PRINT "(GR). A SAMPLE LINE WOULD BE:": FOR X = 1 TO 600: NEXT X
565 PRINT : HTAB 13: PRINT "210 COLOR = 12"
570 FOR X = 1 TO 600: NEXT X: PRINT : PRINT "THIS INSTRUCTION SETS THE COLOR ": PRINT : PRINT "OF A PLOTTED LINE TO GREEN AS 12"
575 PRINT : PRINT "EQUALS GREEN FOR THIS COMPUTER.": PRINT : PRINT : PRINT
580 INPUT "PRESS RETURN FOR MORE.";B$: CALL -936
583 SPEED= 255
585 HOME : VTAB 8: HTAB 6: PRINT "THE APPLE USES 16 COLORS.": VTAB 12: HTAB 6: PRINT "PRESS RETURN TO SEE THEIR NAMES ": PRINT : INPUT "AND NUMBERS.";B$: CALL -936
590 HOME : VTAB 4: HTAB 6: PRINT "0 BLACK 8 BROWN": PRINT : HTAB 6: PRINT "1 MAGENTA 9 ORANGE": PRINT : HTAB 6: PRINT "2 DARK BLUE 10 GREY"
2130 VTAB 5: HTAB 6: PRINT "REMEMBER THAT THE 'GR' COMMAND": PRINT : PRINT "PLACES THE INVISIBLE GRID ON THE": PRINT : PRINT "SCREEN AND SETS THE COLOR TO 0. YOU"
2140 PRINT : PRINT "WILL HAVE TO RESET THE COLOR WHENEVER": PRINT : PRINT "YOU USE 'GR'. THE GRID IS NUMBERED 0"
2150 PRINT : PRINT "TO 39 ACROSS AND 0 TO 39 FROM TOP TO": PRINT : PRINT "BOTTOM."
2155 GOSUB 2990
2160 PRINT : PRINT " SO IN THE INSTRUCTION:": PRINT : PRINT " 110 HLIN 5,35 AT 3": PRINT : PRINT "THE 5 TELLS THE COMPUTER WHERE THE"
2170 PRINT : PRINT "HORIZONTAL LINE BEGINS, 35 TELLS WHERE": PRINT : PRINT "IT STOPS, AND 3 TELLS WHERE IT IS "
2180 PRINT : PRINT "PLACED ON THE SCREEN."
2190 GOSUB 2990
2195 VTAB 6
2200 PRINT : HTAB 6: PRINT "5 AND 35 COULD BE CALLED THE": PRINT : PRINT "'X' COORDINATES AND 3 COULD BE": PRINT : PRINT "CALLED THE 'Y' COORDINATE."
2210 PRINT : HTAB 6: PRINT "YOU SHOULD BE ABLE TO WRITE": PRINT : PRINT "YOUR OWN INSTRUCTIONS TO DRAW": PRINT : PRINT "A LINE NOW."
2220 GOSUB 2990
2230 PRINT : HTAB 6: PRINT "WRITE AN INSTRUCTION, CALL IT": PRINT : PRINT "LINE 120, WHICH WILL DRAW A HORIZONTAL": PRINT : PRINT "LINE FROM COLUMN 10 TO COLUMN 28"
2240 PRINT : PRINT "ON ROW 35. TYPE IT IN AND I'LL CHECK IT": PRINT : PRINT "WHEN YOU ARE READY."
2260 PRINT : PRINT "TYPE YOUR INSTRUCTION HERE"
2265 X$ = "120 HLIN 10":XN$ = "28 AT 35"
2270 PRINT : PRINT : INPUT I$,IN$
2275 IF I$ = X$ THEN 2277
2277 IF XN$ = IN$ THEN 2300
2290 PRINT : PRINT "NO, THAT'S NOT WHAT WE WANT."
2295 PRINT : PRINT "HERE IS THE LINE.": PRINT : HTAB 10: PRINT "120 HLIN 10,28 AT 35."
2297 PRINT : HTAB 6: PRINT "NOW THAT YOU KNOW WHAT THE ": PRINT : PRINT "INSTRUCTION SHOULD SAY, LET'S": PRINT : PRINT "SEE THE HORIZONTAL LINE."
2298 GOSUB 2990
2299 GOTO 2310
2300 PRINT : PRINT "THAT'S JUST WHAT I THOUGHT YOU WOULD": PRINT : PRINT "TYPE. VERY WELL DONE."
2305 GOSUB 2990
2310 HOME : PRINT : PRINT : PRINT "TYPE IN 'RUN' AND I'LL SHOW YOU": PRINT : PRINT "YOUR HORIZONTAL LINE."
2320 INPUT " ";R$
2330 IF R$ = "RUN" THEN 2350
2340 PRINT : PRINT "THE WORD I NEED IS 'RUN'."
2350 RUN 2360
2360 GR : COLOR= 12: HLIN 10,28 AT 35
2370 PRINT "THIS IS YOUR LINE."
2380 INPUT "PRESS RETURN TO CONTINUE.";R$
2390 TEXT : HOME : VTAB 4: HTAB 6: PRINT "YOU'VE DONE QUITE WELL SO FAR."
2395 PRINT : PRINT "YOU SHOULD USE YOUR PROGRAM WORKSHEET ": PRINT : PRINT "TO WRITE YOUR OWN PROGRAM TO DRAW": PRINT : PRINT "LINES NOW. TYPE IN YOUR"
2400 PRINT : PRINT "INSTRUCTIONS AND RUN THEM.": PRINT : HTAB 6: PRINT "DON'T FORGET TO SET THE GRAPHICS": PRINT : PRINT "MODE (GR) AND COLOR AT THE BEGINNING."
2410 GOTO 596
2990 REM SUBROUTINE FOR RETURN
2995 PRINT : PRINT : INPUT "PRESS RETURN FOR MORE";B$: HOME
2998 RETURN
2999 SPEED= 255
3000 HOME : VTAB 6: HTAB 6: PRINT "'VLIN' IS A BASIC COMMAND WHICH": PRINT : PRINT "WILL DRAW A VERTICAL LINE ON THE SCREEN."
3010 VTAB 10: HTAB 6: PRINT "'VLIN' WORKS JUST LIKE 'HLIN' WHICH": VTAB 12: PRINT "WE REVIEWED EARLIER. THE POSITION OF"
3020 PRINT : PRINT "THE VERTICAL LINE IS DETERMINED": PRINT : PRINT "BY THE NUMBERS OF THE ROWS AND COLUMNS": PRINT : PRINT "ON THE INVISIBLE GRID."
3030 GOSUB 2990
3040 VTAB 3: HTAB 6: PRINT "HERE IS AN INSTRUCTION WITH": VTAB 5: PRINT "A 'VLIN' COMMAND. LOOK AT IT TO SEE": VTAB 7: PRINT "HOW IT WORKS."
3060 VTAB 13: HTAB 6: PRINT "YOU SHOULD SEE THE SIMILARITY BE-": VTAB 15: PRINT "TWEEN THIS INSTRUCTION AND THE ONE YOU": VTAB 17: PRINT "WROTE FOR 'HLIN.'"
3070 GOSUB 2990
3080 VTAB 8: HTAB 6: PRINT "TYPE IN 'RUN' TO SEE A DEMON-": VTAB 10: PRINT "STRATION OF A PROGRAM WHICH USES BOTH": VTAB 12: PRINT "'HLIN' AND 'VLIN' COMMANDS.
3090 PRINT : INPUT R$
3100 GR : COLOR= 6
3110 HLIN 5,37 AT 35
3115 VLIN 5,34 AT 5: VLIN 5,34 AT 37: HLIN 5,37 AT 5
3120 VLIN 20,34 AT 10: VLIN 20,34 AT 11: VLIN 20,34 AT 12
3130 VLIN 15,34 AT 20: VLIN 15,34 AT 21: VLIN 15,34 AT 22
3140 VLIN 10,34 AT 30: VLIN 10,34 AT 31: VLIN 10,34 AT 32
3150 PRINT "YOU COULD DRAW THIS GRAPH,TOO."
3160 GOSUB 2990
3170 TEXT : HOME : TEXT
3180 VTAB 8: HTAB 6: PRINT "TYPE IN 'LIST' AND I'LL SHOW": VTAB 10: PRINT "YOU THE PROGRAM WHICH DRAWS THE GRAPH."
3190 PRINT : INPUT L$
3200 LIST 3100,3140
3210 GOSUB 2990
3220 HOME : VTAB 3: HTAB 6: PRINT "YOU SHOULD BE ABLE TO WRITE": VTAB 5: PRINT "YOUR OWN PROGRAM FOR DRAWING BOTH": VTAB 7: PRINT "HORIZONTAL AND VERTICAL LINES NOW."
3230 VTAB 10: HTAB 6: PRINT "YOU MAY WANT TO REVIEW BEFORE": VTAB 12: PRINT "YOU START WRITING."
3240 GOTO 260
4000 HOME : VTAB 4: HTAB 6
4010 PRINT "'FOR...NEXT' IS A BASIC COMMAND": VTAB 6: PRINT "WHICH ESTABLISHES A LOOP IN YOUR PROGRAM"
4015 VTAB 8: PRINT "AND LETS YOU PERFORM A FUNCTION FOR"
4020 VTAB 10: PRINT "A SPECIFIED NUMBER OF TIMES."
4030 VTAB 12: HTAB 6: PRINT "HERE IS AN EXAMPLE:"
4040 VTAB 14: HTAB 8: PRINT "160 FOR NUMBER = 1 TO 12": VTAB 16: HTAB 8: PRINT "170 PRINT NUMBER": VTAB 18: HTAB 8: PRINT "180 NEXT NUMBER"
4050 VTAB 20: HTAB 6: PRINT "STUDY THIS AND DECIDE WHAT IT DOES."
4060 GOSUB 2990
4070 VTAB 4: HTAB 6: PRINT "TYPE IN 'RUN' TO SEE THE PROGRAM": VTAB 6: PRINT "OPERATE."
4080 INPUT R$
4090 FOR NUMBER = 1 TO 12: PRINT NUMBER: NEXT NUMBER
4100 PRINT : PRINT "DID IT DO WHAT YOU EXPECTED?"
4110 GOSUB 2990
4120 VTAB 3: HTAB 6: PRINT "HERE IS THE EXAMPLE AGAIN."
4130 VTAB 5: HTAB 8: PRINT "160 FOR NUMBER =1 TO 12": VTAB 7: HTAB 8: PRINT "170 PRINT NUMBER": VTAB 9: HTAB 8: PRINT "180 NEXT NUMBER"
4140 VTAB 12: HTAB 5: PRINT "LINE 180 LOOPS BACK TO 160 12 TIMES."
4150 VTAB 14: PRINT "'FOR' AND 'NEXT' WORK TOGETHER IN": VTAB 16: PRINT "BASIC. THEY PERFORM THE FUNCTION"
4160 VTAB 18: PRINT "INSERTED BETWEEN THEM FOR THE NUMBER OF": VTAB 20: PRINT "TIMES SPECIFIED IN THE LINE WITH 'FOR'"
4170 GOSUB 2990
4180 VTAB 3: HTAB 6: PRINT "HERE IS A PROGRAM THAT USES THE ": VTAB 5: PRINT "'FOR...NEXT' LOOP WITH THE 'HLIN'"
4185 VTAB 7: PRINT "AND 'VLIN' COMMANDS TO COMPLETE "
4190 VTAB 9: PRINT "ITS TASKS."
4200 VTAB 11: HTAB 6: PRINT "TYPE IN 'RUN' TO SEE IT WORK."
4210 VTAB 13: INPUT R$
4220 GR : COLOR= 5
4230 FOR N = 5 TO 30 STEP 5
4240 HLIN 5,35 AT N
4250 NEXT N
4260 FOR V = 5 TO 35 STEP 5
4270 VLIN 5,35 AT V
4280 NEXT V
4290 PRINT "YOU COULD DO THIS,TOO.
4300 GOSUB 2990
4310 HOME : TEXT : HOME
4320 VTAB 4: HTAB 6: PRINT "TO SEE THE PROGRAM INSTRUCTIONS": VTAB 6: PRINT "WHICH DREW THE GRID, TYPE IN 'LIST.'"
4325 PRINT
4330 INPUT L$
4340 LIST 4220,4280
4350 PRINT : HTAB 6: PRINT "STUDY THIS TO SEE HOW THE "
4360 PRINT : PRINT "'FOR...NEXT' LOOPS WORK."
4370 GOSUB 2990
4380 VTAB 4: HTAB 6: PRINT "BY NOW YOU SHOULD HAVE A GOOD IDEA"
4390 VTAB 6: PRINT "OF THE WAY SOME OF THE GRAPHICS COMMANDS"
4400 VTAB 8: PRINT "WORK TO DRAW LINES ON THE SCREEN."
4410 VTAB 10: HTAB 6: PRINT "TRY TO THINK OF A GOOD WAY TO USE"
4420 VTAB 12: PRINT "THIS NEW INFORMATION IN YOUR NEXT": VTAB 14: PRINT "PROGRAM."